/**
 * Created by Administrator on 2016/4/5.
 */
function share () {
    var host = "http://car2go.xuanzhen-tech.com";
    //var option = {
    //    title: '出行方式大洗牌',
    //    desc: '即行car2go正式推行，快来先约为快',
    //    link: host + '/index.php/act/h5/index?qr=app',
    //    imgUrl: host + '/Public/H5/img/fenxiang.png',
    //};
    var option = {
        title: '爱心报案', // 分享标题
        desc: '爱心报案', // 分享描述
        link: host + '/index.php/act/report/index', // 分享链接
        imgUrl: host + '/Public/H5/img/fenxiang.jpg', // 分享图标
    };

    //var option2 = {
    //    title: '即行car2go正式推行，快来先约为快',
    //    link: host + '/index.php/act/h5/index?qr=app',
    //    imgUrl: host + '/Public/H5/img/fenxiang.png',
    //};

    wx.onMenuShareTimeline(option);
    wx.onMenuShareAppMessage(option);
    wx.onMenuShareWeibo(option);
    wx.onMenuShareQQ(option);
    wx.onMenuShareQZone(option);
}

$(function() {
    wx.ready(share);
    
    $.getJSON('php/sign.php?url=' + encodeURIComponent(location.href), function (data) {
        data.jsApiList = [
            "onMenuShareTimeline",
            "onMenuShareAppMessage",
            "onMenuShareQQ",
            "onMenuShareWeibo",
            "onMenuShareQZone"
        ];
        wx.config(data);
    });
});
